package com.bweab.util;
/***
 * 前后端通信json状态码设置
 *
 * statusCode //状态码信息
 * message    //状态码功能描述
 *
 */

public enum JSONStats

{


    //定义枚举类型
    ADMIN_ADD_USER_SUCCESS(200,"添加成功"),
    ADMIN_ADD_USER_ERROR(407,"添加成功"),

    //登录成功
    SUCCESS(200, "登录成功"),
    //登录失败
    LOGIN_ERROR(405, "登录失败"),
    //用户名登录错误
    LOGIN_USERNAME_ERROR(501,"用户名错误"),
    //登录密码错误
    LOGIN_PASSWORD_ERROR(502,"密码错误"),
    //用户名错误
    USERNAME_ERROR(503,"用户名错误"),
    //用户名不存在
    USERNAME_NULL(504,"用户名不存在"),
    //注册成功
    REGIST_SUCCESS(200,"注册成功"),
    //注册失败
    REGIST_ERROR(405,"注册失败"),
    //用户名存在
    REGIST_SPAN(406,"用户名被占用"),
    REGIST_OK(201,"用户名可用"),

    //修改成功状态码
    USER_ALTER_OK(202,"修改成功"),
    USER_ALTER_ERROR(407,"修改失败"),

    //密码错误
    USER_PASSWORD_ERROR(407,"密码错误"),
    //密码正确
    USER_PASSWORD_OK(203,"密码正确"),
    //密码错误
    //未知错误
    USER_ERROR(408,"未知错误"),
    //修改密码
    ALTER_USER_PWD_OK(204,"修改成功"),
    ALTER_USER_PWD_ERROR(409,"修改失败"),

    /**
     * 寝室相关
     * */
     CHECK_DORMITORY_NAME_OK(205,"寝室存在"),
    CHECK_DORMITORY_NAME_ERROR(407,"寝室不存在"),
    //寝室修改失败
    ALTER_DORMITORY_SUCCESS(200,"寝室信息修改成功"),
    ALTER_DORMITORY_ERROR(407,"寝室信息修改失败"),
    //添加寝室信息
    ADD_DORMITORY_SUCCESS(200,"寝室添加成功"),
    ADD_DORMITORY_ERROR(200,"寝室添加失败"),

    //删除寝室信息
    DELETE_DORMITORY_SUCCESS(200,"寝室删除成功"),
    DELETE_DORMITORY_ERROR(407,"寝室删除失败"),

    /**
     *
     * 充值相关
     * */

    DESPOIT_MONKEY_OK(205,"充值成功"),
    DESPOIT_MONKEY_ERROR(407,"充值失败"),
    //充值记录增加



    QUERY_SUCCESS(200, "查询成功"),
    QUERY_ERROR(407,"查询失败"),
    //修改充值记录
    ALTER_DEPOSIT_SUCCESS(200,"充值记录修改成功"),
    ALTER_DEPOSIT_ERROR(407,"充值记录修改失败"),
    //删除相关
    DELETE_DEPOSIT_SUCCESS(200,"充值记录删除成功"),
    DELETE_DEPOSIT_ERROR(407,"充值记录删除失败"),
    DELETE_SUCCESS(200,"删除成功" ),
    DELETE_ERROR(407,"删除失败")



    ;
    //登录成功响应状态码
    private  Integer statusCode;
    private  String message;

    private JSONStats(Integer statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
